package com.snopy.io.lineoritented;

import java.io.*;

/**
 * @author snopy
 * @version 1.0.0
 * @classname DemoLineOritented
 * @description
 * @email 77912204@qq.com
 * @date 2022/11/15 20:02
 */
public class DemoLineOritented {

    public static void main(String[] args) {
        BufferedReader in = null;
        PrintWriter out = null;
        try {
            in = new BufferedReader(new FileReader("F:\\workspaceA\\Sonata\\Sonata_test\\src\\main\\resources\\abc.txt"));
            out = new PrintWriter(new FileWriter("./bb.txt"));
            String line;
            while ((line = in.readLine())!= null){
                out.println(line);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }finally {
            if (in != null){
                try {
                    in.close();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            if (out != null){
                out.close();
            }
        }
    }
}
